package com.web.base.user.service;

import com.blue.jdbc.JdbcDataSource;
import com.blue.jdbc.Page;
import com.web.base.user.dao.OfficeUserDao;
import com.web.base.user.model.OfficeUser;
import com.web.core.util.Const;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 部门－用户业务层
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2017年04月16日
 */
@Service
@Transactional
@JdbcDataSource(Const.DS_BASE)
public class OfficeUserService
{
	@Autowired
	private OfficeUserDao officeUserDao;
	
	public OfficeUserService()
	{
	}
	
	
	public OfficeUser get(Integer id)
	{
		OfficeUser log = officeUserDao.get(id);
		return log;
	}
	
	public Page<OfficeUser> list(OfficeUser officeUser, Page<OfficeUser> page)
	{
		page = officeUserDao.list(officeUser, page);
		return page;
	}
	
	public List<OfficeUser> list(OfficeUser officeUser)
	{
		List<OfficeUser> list = officeUserDao.list(officeUser);
		return list;
	}
	
	public void delete(OfficeUser officeUser)
	{
		officeUserDao.delete(officeUser);
	}
	
}
